<div id="user-profile">
  <%= render :partial => 'users/header', :locals => {:user => @user} %>

  <h3><%=h "About".t %> <%=h ( (@author && params[:pseud]) ? @author.name : @user.login) %></h3>

  <p><%= "Member since:".t %> <%= @user.created_at.localize("%B %Y") %></p>

  <%- if @user.is_beta_tester? -%>
    <p><%= "Beta tester".t %></p>
  <%- end -%>
  
  <p><%=h @user.profile.title %></p>

  <dl id="user-data">
    <dt class="pseuds"><%= "My pseuds:".t %></dt>
      <dd class="pseuds"><%= print_pseuds(@user) %></dd>
    <%- if @user.profile.location? -%>
    <dt class="location"><%=h "I live in:".t %></dt>
      <dd><%=h @user.profile.location -%></dd>
      <%- end -%>
    <%- if @user.preference.date_of_birth_visible -%>
    <dt class="birthday"><%=h "My birthday:".t %></dt>
      <dd class="birthday"><%=h @user.profile.date_of_birth -%></dd> 
    <%- end -%>
    <%- if @user.preference.email_visible -%>
    <dt class="email"><%=h "My email address:".t %></dt>
      <dd class="email"><%= mail_to @user.email, nil, :encode => "hex" %></dd>
    <%- end -%>
  </dl>

  <div id="user-bio">
    <h3><%=h "About me:".t %></h3>
    <%=sanitize_and_format_for_display @user.profile.about_me -%>
  </div>
  
  <%- if logged_in? && current_user == @user -%>
  <ul class="navigation">
    <li><%= link_to "Edit My Profile".t, edit_user_path(@user) %></li>
    <li><%= link_to "Set My Preferences".t, user_preferences_path(@user) %></li>
		<li><%= link_to "Delete My Account".t, @user, :confirm => 'This will permanently delete your account and cannot be undone. Are you sure?'.t, :method => :delete %></li>
  </ul>
  <%- end -%>
</div>
